import babelpolyfill from 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import VueRouter from 'vue-router'
import store from './vuex/store'
import 'element-ui/lib/theme-default/index.css'
import 'font-awesome/css/font-awesome.min.css'
import Home from './views/Home.vue'
import filter from './filter'
import routes from './routes'
import dataService from './dataService'
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(filter)
Vue.use(dataService)
const router = new VueRouter({
  //mode: 'history',
  routes
})
/*
router.beforeEach((to, from, next) => {
  if (to.meta.requireAuth) {
        if (store.state.token) {
            next();
        }
        else {
            next({
                path: '/login'
            })
        }
    }
    else {
        next();
    }
})
*/
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

